-
Notifications
You must be signed in to change notification settings - Fork 6
Add AGENTS files #609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Add AGENTS files #609
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (4)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying infrahub-sdk-python with
|
| Latest commit: |
b07995c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://143f020a.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://dga-20251109-agents.infrahub-sdk-python.pages.dev |
… frontmatter Fix Vale linting errors in docs/AGENTS.md by adding valid terms to spelling exceptions: - Diataxis: Documentation framework name - Typer: Python CLI library name - callouts: Documentation component term - frontmatter: MDX frontmatter term This resolves the CI failures in PR #609.
|
|
||
| ### Core Technologies | ||
|
|
||
| - **Python**: 3.9-3.13 (see `pyproject.toml` for exact version requirements) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we specifically mention that pyproject.toml should be consulted for exact version requirements for Python. I'm wondering if we should instead do that for all of the other requirements, i.e. instead of hardcoding mypy, ruff and all other dependencies to fixed versions or current ranges. I feel it's something that will be hard to keep up to date and end up providing obsolete instructions.
| - **Ruff**: Comprehensive linting and formatting (0.11.0) | ||
| - Configuration in `pyproject.toml` under `[tool.ruff]` | ||
| - Line length: 120 (formatter), 150 (pycodestyle) | ||
| - Max complexity: 17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should lower the complexity for new code and try to start it out at 10.
| # WRONG | ||
| class MyCheck(InfrahubCheck): | ||
| def check(self, data): # This will NOT work | ||
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all of the examples provided to the agents I think we should use methods with full typing on all parameters and return values.
| │ └── relationship.py # Relationship management | ||
| ├── ctl/ # CLI commands (infrahubctl) | ||
| ├── pytest_plugin/ # Custom pytest plugin for Infrahub testing | ||
| └── protocols.py # Generated protocol classes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comments for these files are aligned in the file in the docs section. I think we should do the same here so it's a bit easier to read.
|
LGTM, the main thing I'd update for now is to ensure that all of the code examples are fully typed as that's what we'd expect in any generated code. |
e6779d7 to
838fcf6
Compare
… frontmatter Fix Vale linting errors in docs/AGENTS.md by adding valid terms to spelling exceptions: - Diataxis: Documentation framework name - Typer: Python CLI library name - callouts: Documentation component term - frontmatter: MDX frontmatter term This resolves the CI failures in PR #609.
This PR adds a few AGENTS.md files across the repository to help AI Agents work on the project.
This is really a starting point and I would expect us to modify them heavily as we really start to use them
Here is the main prompt I use to generate these files in Cursor.